package com.imooc.miaosha.pojo.vo;

import com.imooc.miaosha.pojo.domain.Goods;
import com.imooc.miaosha.pojo.domain.MiaoshaGoods;

import java.util.Date;

/**
 * 查询商品信息的同时查询其秒杀信息，所以需要继承主表
 * 感觉会使用join查询，主表就是{@link Goods}，好巧妙
 * 但是为什么不能直接同时继承{@link Goods}和{@link MiaoshaGoods}呢？
 * 这是因为基础知识：Class cannot extend multiple classes
 */
public class GoodsVo extends Goods {
    private double miaoshaPrice;
    private int stockCount;
    private Date startDate;
    private Date endDate;
    private long remainSeconds=-1;
    private int miaoshaStatus=-1;

    @Override
    public String toString() {
        return "GoodsVo{" +
                "miaoshaPrice=" + miaoshaPrice +
                ", stockCount=" + stockCount +
                ", startDate=" + startDate +
                ", endDate=" + endDate +
                ", remainSeconds=" + remainSeconds +
                ", miaoshaStatus=" + miaoshaStatus +
                '}';
    }

    public long getRemainSeconds() {
        return remainSeconds;
    }

    public void setRemainSeconds(long remainSeconds) {
        this.remainSeconds = remainSeconds;
    }

    public int getMiaoshaStatus() {
        return miaoshaStatus;
    }

    public void setMiaoshaStatus(int miaoshaStatus) {
        this.miaoshaStatus = miaoshaStatus;
    }

    public double getMiaoshaPrice() {
        return miaoshaPrice;
    }

    public void setMiaoshaPrice(double miaoshaPrice) {
        this.miaoshaPrice = miaoshaPrice;
    }

    public int getStockCount() {
        return stockCount;
    }

    public void setStockCount(int stockCount) {
        this.stockCount = stockCount;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
}
